//
//  CAObject.m
//  qiche
//
//  Created by liu haley on 12-12-11.
//  Copyright (c) 2012年 iCar. All rights reserved.
//

#import "CAObject.h"

@implementation CAObject

@end


@implementation CAVinObject
@synthesize vinCode,carNumber,vinCodeDataSource,calibrationId,calibrationIdDataSource,spValue,totalMileage,isTestSteer,ownerName,buyDate,manufacturerAddress,productiveYear,country,literAvg,maintenanceInterval,carColor,fuelOilType,carPic,manufacturerId,mid,carTypeId,carSeriesId,carType,carSeries,brand,manufacturer,isByHandInput,formula1Ratio1,formula2Ratio1,IdlingRatio1,idlingRatio2,displacement,Id;
-(void)dealloc
{
    self.vinCode = nil;
    self.carNumber = nil;
    self.vinCodeDataSource = nil;
    self.calibrationId = nil;
    self.calibrationIdDataSource = nil;
    self.spValue = nil;
    self.totalMileage = nil;
    self.ownerName = nil;
    self.buyDate = nil;
    self.manufacturerAddress = nil;
    self.productiveYear = nil;
    self.country = nil;
    self.literAvg = nil;
    self.maintenanceInterval = nil;
    self.carColor = nil;
    self.fuelOilType = nil;
    self.carPic = nil;
    self.carType = nil;
    self.carSeries = nil;
    self.brand = nil;
    self.manufacturer = nil;
    self.formula1Ratio1 = nil;
    self.formula2Ratio1 = nil;
    self.IdlingRatio1 = nil;
    self.idlingRatio2 = nil;
    self.displacement = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    if (self) {
        
    }
    return self;
}

-(id)initWithDict:(NSDictionary *)dict
{
    if (!dict) {
        return nil;
    }
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"vinCode"]isKindOfClass: [NSNull class]]) {
            self.vinCode = [dict valueForKey:@"vinCode"];
        }
        if (![[dict objectForKey:@"carNumber"]isKindOfClass: [NSNull class]]) {
            self.carNumber = [dict valueForKey:@"carNumber"];
        }
        if (![[dict objectForKey:@"vinCodeDataSource"]isKindOfClass: [NSNull class]]) {
            self.vinCodeDataSource = [dict valueForKey:@"vinCodeDataSource"];
        }
        if (![[dict objectForKey:@"calibrationId"]isKindOfClass: [NSNull class]]) {
            self.calibrationId = [dict objectForKey:@"calibrationId"];
        }
        if (![[dict objectForKey:@"spValue"]isKindOfClass: [NSNull class]]) {
            self.spValue = [dict objectForKey:@"spValue"];
        }
        if (![[dict objectForKey:@"totalMileage"]isKindOfClass: [NSNull class]]) {
            self.totalMileage = [dict objectForKey:@"totalMileage"];
        }
        if (![[dict objectForKey:@"vinCode"]isKindOfClass: [NSNull class]]) {
            self.vinCode = [dict objectForKey:@"vinCode"];
        }
        if (![[dict objectForKey:@"isTestSteer"]isKindOfClass: [NSNull class]]) {
            self.isTestSteer = [[dict objectForKey:@"isTestSteer"] intValue];
        }
        if (![[dict objectForKey:@"ownerName"]isKindOfClass: [NSNull class]]) {
            self.ownerName = [dict objectForKey:@"ownerName"];
        }
        if (![[dict objectForKey:@"buyDate"]isKindOfClass: [NSNull class]]) {
            self.buyDate = [dict objectForKey:@"buyDate"];
        }
        if (![[dict objectForKey:@"manufacturerAddress"]isKindOfClass: [NSNull class]]) {
            self.manufacturerAddress = [dict objectForKey:@"manufacturerAddress"];
        }
        if (![[dict objectForKey:@"productiveYear"]isKindOfClass: [NSNull class]]) {
            self.productiveYear = [dict objectForKey:@"productiveYear"];
        }
        if (![[dict objectForKey:@"country"]isKindOfClass: [NSNull class]]) {
            self.country = [dict objectForKey:@"country"];
        }
        if (![[dict objectForKey:@"literAvg"]isKindOfClass: [NSNull class]]) {
            self.literAvg = [dict objectForKey:@"literAvg"];
        }
        if (![[dict objectForKey:@"maintenanceInterval"]isKindOfClass: [NSNull class]]) {
            self.maintenanceInterval = [dict objectForKey:@"maintenanceInterval"];
        }
        if (![[dict objectForKey:@"carColor"]isKindOfClass: [NSNull class]]) {
            self.carColor = [dict objectForKey:@"carColor"];
        }
        if (![[dict objectForKey:@"fuelOilType"]isKindOfClass: [NSNull class]]) {
            self.fuelOilType = [dict objectForKey:@"fuelOilType"];
        }
        if (![[dict objectForKey:@"carPic"]isKindOfClass: [NSNull class]]) {
            self.carPic = [dict objectForKey:@"carPic"];
        }
        if (![[dict objectForKey:@"manufacturerId"]isKindOfClass: [NSNull class]]) {
            self.manufacturerId = [[dict objectForKey:@"manufacturerId"] intValue];
        }
        if (![[dict objectForKey:@"mid"]isKindOfClass: [NSNull class]]) {
            self.mid = [[dict objectForKey:@"mid"] intValue];
        }
        if (![[dict objectForKey:@"carTypeId"]isKindOfClass: [NSNull class]]) {
            self.carTypeId = [[dict objectForKey:@"carTypeId"] intValue];
        }
        if (![[dict objectForKey:@"carSeriesId"]isKindOfClass: [NSNull class]]) {
            self.carSeriesId = [[dict objectForKey:@"carSeriesId"] intValue];
        }
        if (![[dict objectForKey:@"carType"]isKindOfClass: [NSNull class]]) {
            self.carType = [dict objectForKey:@"carType"];
        }
        if (![[dict objectForKey:@"carSeries"]isKindOfClass: [NSNull class]]) {
            self.carSeries = [dict objectForKey:@"carSeries"];
        }
        if (![[dict objectForKey:@"brand"]isKindOfClass: [NSNull class]]) {
            self.brand = [dict objectForKey:@"brand"];
        }
        if (![[dict objectForKey:@"manufacturer"]isKindOfClass: [NSNull class]]) {
            self.manufacturer = [dict objectForKey:@"manufacturer"];
        }
        if (![[dict objectForKey:@"isByHandInput"]isKindOfClass: [NSNull class]]) {
            self.isByHandInput = [[dict objectForKey:@"isByHandInput"] intValue];
        }
        if (![[dict objectForKey:@"formula1Ratio1"]isKindOfClass: [NSNull class]]) {
            self.formula1Ratio1 = [dict objectForKey:@"formula1Ratio1"];
        }
        if (![[dict objectForKey:@"formula2Ratio1"]isKindOfClass: [NSNull class]]) {
            self.formula2Ratio1 = [dict objectForKey:@"formula2Ratio1"];
        }
        if (![[dict objectForKey:@"IdlingRatio1"]isKindOfClass: [NSNull class]]) {
            self.IdlingRatio1 = [dict objectForKey:@"IdlingRatio1"];
        }
        if (![[dict objectForKey:@"idlingRatio2"]isKindOfClass: [NSNull class]]) {
            self.idlingRatio2 = [dict objectForKey:@"idlingRatio2"];
        }
        if (![[dict objectForKey:@"displacement"]isKindOfClass: [NSNull class]]) {
            self.displacement = [dict objectForKey:@"displacement"];
        }
        if (![[dict objectForKey:@"Id"]isKindOfClass: [NSNull class]]) {
            self.Id = [[dict objectForKey:@"Id"] intValue];
        }
    }
    return self;
}

@end